﻿<UserControl x:Class="Berico.SnagL.Infrastructure.Modularity.Toolbar.TreeToolbarItemExtensionView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:local="clr-namespace:Berico.SnagL.Infrastructure.Controls"   
    xmlns:common="clr-namespace:Berico.Common.UI.Triggers;assembly=Berico.Common"
    xmlns:berico="clr-namespace:Berico.Windows.Controls;assembly=Berico.Windows.Controls"  
    xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.SL4"             
    xmlns:MS="clr-namespace:Microsoft.Windows.Controls;assembly=Microsoft.Windows.Controls.WatermarkedTextBox"
    xmlns:convertors="clr-namespace:Berico.Common.UI.Converters;assembly=Berico.Common"             
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"       
    xmlns:triggers="clr-namespace:Berico.Common.UI.Triggers;assembly=Berico.Common"
    mc:Ignorable="d"
    d:DesignHeight="35" d:DesignWidth="35">

	<UserControl.Resources>
		<convertors:VisibilityConverter x:Key="VisibilityConverter" />

		<ControlTemplate x:Key="MenuItemTemplate" TargetType="ListBoxItem">
			<Grid Background="{TemplateBinding Background}">
				<VisualStateManager.VisualStateGroups>
					<VisualStateGroup x:Name="CommonStates">
						<VisualState x:Name="Normal"/>
						<VisualState x:Name="MouseOver">
							<Storyboard>
								<DoubleAnimation Duration="0" To=".35" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="fillColor"/>
							</Storyboard>
						</VisualState>
						<VisualState x:Name="Disabled">
							<Storyboard>
								<DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
							</Storyboard>
						</VisualState>
					</VisualStateGroup>
					<VisualStateGroup x:Name="SelectionStates">
						<VisualState x:Name="Unselected"/>
						<VisualState x:Name="Selected">
							<Storyboard>
								<DoubleAnimation Duration="0" To=".75" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="fillColor2"/>
							</Storyboard>
						</VisualState>
					</VisualStateGroup>
					<VisualStateGroup x:Name="FocusStates">
						<VisualState x:Name="Focused">
							<Storyboard>
								<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
									<DiscreteObjectKeyFrame KeyTime="0">
										<DiscreteObjectKeyFrame.Value>
											<Visibility>Visible</Visibility>
										</DiscreteObjectKeyFrame.Value>
									</DiscreteObjectKeyFrame>
								</ObjectAnimationUsingKeyFrames>
							</Storyboard>
						</VisualState>
						<VisualState x:Name="Unfocused"/>
					</VisualStateGroup>
				</VisualStateManager.VisualStateGroups>
				<Rectangle x:Name="fillColor" Fill="#FFBADDE9" IsHitTestVisible="False" Opacity="0" RadiusY="1" RadiusX="1"/>
				<Rectangle x:Name="fillColor2" Fill="#FFBADDE9" IsHitTestVisible="False" Opacity="0" RadiusY="1" RadiusX="1"/>
				<Grid>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto" MinWidth="24" />
						<ColumnDefinition Width="4" />
						<ColumnDefinition Width="*" />
						<ColumnDefinition Width="17" />
					</Grid.ColumnDefinitions>
					<ContentPresenter Content="{Binding Icon}" Margin="1" VerticalAlignment="Center" />
					<ContentPresenter x:Name="contentPresenter" Grid.Column="2" Margin="{TemplateBinding Padding}" Content="{Binding Header}" />
				</Grid>
				<Rectangle x:Name="FocusVisualElement" Grid.Column="0" Grid.ColumnSpan="2" RadiusY="1" RadiusX="1" Stroke="#FF6DBDD1" StrokeThickness="1" Visibility="Collapsed"/>
			</Grid>
		</ControlTemplate>

		<ControlTemplate x:Key="MenuList" TargetType="ListBox">
			<Grid>
				<Border>
					<ItemsPresenter />
				</Border>
			</Grid>
		</ControlTemplate>

		<Style TargetType="ListBoxItem" x:Key="MenuItemStyle">
			<Setter Property="Padding" Value="4,3,2,3" />
			<Setter Property="Template" Value="{StaticResource MenuItemTemplate}" />
		</Style>

		<Style x:Key="MenuListStyle" TargetType="ListBox">
			<Setter Property="Template" Value="{StaticResource MenuList}" />
			<Setter Property="ItemContainerStyle" Value="{StaticResource MenuItemStyle}" />
		</Style>

		<Style x:Key="SearchButtonStyle" TargetType="berico:SplitButton">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="berico:SplitButton">
						<Grid x:Name="LayoutRoot">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="*"/>
								<ColumnDefinition Width="Auto"/>
							</Grid.ColumnDefinitions>
							<Grid.Resources>
								<Style x:Key="BlankButton" TargetType="Button">
									<Setter Property="IsEnabled" Value="true"/>
									<Setter Property="IsTabStop" Value="true"/>
									<Setter Property="Background" Value="Transparent"/>
									<Setter Property="Foreground" Value="#FF000000"/>
									<Setter Property="MinWidth" Value="5"/>
									<Setter Property="MinHeight" Value="5"/>
									<Setter Property="HorizontalAlignment" Value="Left" />
									<Setter Property="HorizontalContentAlignment" Value="Left"/>
									<Setter Property="VerticalContentAlignment" Value="Center"/>
									<Setter Property="Cursor" Value="Hand"/>
									<Setter Property="Template">
										<Setter.Value>
											<ControlTemplate TargetType="Button">
												<Grid Height="Auto" Width="Auto">
													<Grid.Resources>
														<LinearGradientBrush x:Key="ButtonBorderGradient" EndPoint="0.5,1" StartPoint="0.5,0">
															<GradientStop Color="#FF4F4F4F"/>
															<GradientStop Color="#FF464646" Offset="1"/>
														</LinearGradientBrush>
														<SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF"/>
													</Grid.Resources>
													<vsm:VisualStateManager.VisualStateGroups>
														<vsm:VisualStateGroup x:Name="CommonStates">
															<vsm:VisualStateGroup.Transitions>
																<vsm:VisualTransition GeneratedDuration="0:0:0.2" To="Pressed"/>
															</vsm:VisualStateGroup.Transitions>
															<vsm:VisualState x:Name="Normal" />
															<vsm:VisualState x:Name="Pressed" />
															<vsm:VisualState x:Name="Disabled">
																<Storyboard>
																	<DoubleAnimation Storyboard.TargetName="SB_Caption_Image" Storyboard.TargetProperty="(UIElement.Opacity)" Duration="0" To=".55"/>
																</Storyboard>
															</vsm:VisualState>
															<vsm:VisualState x:Name="MouseOver">
																<Storyboard>
																	<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Visibility" Duration="0">
																		<DiscreteObjectKeyFrame KeyTime="0">
																			<DiscreteObjectKeyFrame.Value>
																				<Visibility>Visible</Visibility>
																			</DiscreteObjectKeyFrame.Value>
																		</DiscreteObjectKeyFrame>
																	</ObjectAnimationUsingKeyFrames>
																	<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradientMouseOver" Storyboard.TargetProperty="Visibility" Duration="0">
																		<DiscreteObjectKeyFrame KeyTime="0">
																			<DiscreteObjectKeyFrame.Value>
																				<Visibility>Visible</Visibility>
																			</DiscreteObjectKeyFrame.Value>
																		</DiscreteObjectKeyFrame>
																	</ObjectAnimationUsingKeyFrames>
																</Storyboard>
															</vsm:VisualState>
														</vsm:VisualStateGroup>
														<vsm:VisualStateGroup x:Name="CheckStates">
															<vsm:VisualStateGroup.Transitions>
																<vsm:VisualTransition GeneratedDuration="0:0:0.2" To="Checked"/>
															</vsm:VisualStateGroup.Transitions>
															<vsm:VisualState x:Name="Unchecked" >
																<Storyboard/>
															</vsm:VisualState>
															<vsm:VisualState x:Name="Checked">
																<Storyboard>
																	<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundChecked" Storyboard.TargetProperty="Visibility" Duration="0">
																		<DiscreteObjectKeyFrame KeyTime="0">
																			<DiscreteObjectKeyFrame.Value>
																				<Visibility>Visible</Visibility>
																			</DiscreteObjectKeyFrame.Value>
																		</DiscreteObjectKeyFrame>
																	</ObjectAnimationUsingKeyFrames>
																	<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradientChecked" Storyboard.TargetProperty="Visibility" Duration="0">
																		<DiscreteObjectKeyFrame KeyTime="0">
																			<DiscreteObjectKeyFrame.Value>
																				<Visibility>Visible</Visibility>
																			</DiscreteObjectKeyFrame.Value>
																		</DiscreteObjectKeyFrame>
																	</ObjectAnimationUsingKeyFrames>
																</Storyboard>
															</vsm:VisualState>
														</vsm:VisualStateGroup>
													</vsm:VisualStateManager.VisualStateGroups>
													<Border x:Name="BackgroundMouseOver" Visibility="Collapsed" BorderBrush="Transparent" BorderThickness="1" CornerRadius="5,5,5,5" Background="#FFA9A9A9" />
													<Border x:Name="BackgroundGradientMouseOver" Visibility="Collapsed" BorderBrush="{StaticResource ButtonBorderGradient}" BorderThickness="1" CornerRadius="5,5,5,5" >
														<Border.Background>
															<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
																<GradientStop Color="#FCFFFFFF"/>
																<GradientStop Color="#4CFFFFFF" Offset="1"/>
															</LinearGradientBrush>
														</Border.Background>
													</Border>
													<Border x:Name="BackgroundChecked" Visibility="Collapsed" BorderBrush="Transparent" BorderThickness="1" CornerRadius="5,5,5,5" Background="#FFA9A9A9" />
													<Border x:Name="BackgroundGradientChecked" Visibility="Collapsed" BorderBrush="{StaticResource ButtonBorderGradient}" BorderThickness="1" CornerRadius="5,5,5,5" >
														<Border.Background>
															<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
																<GradientStop Color="#FCFFFFFF"/>
																<GradientStop Color="#4CFFFFFF" Offset="1"/>
															</LinearGradientBrush>
														</Border.Background>
													</Border>
													<ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
													<Border x:Name="DisabledVisual" Background="{StaticResource DisabledBrush}" BorderBrush="Transparent" BorderThickness="1" CornerRadius="5,0,0,5" Opacity="0" HorizontalAlignment="Stretch" />
												</Grid>
											</ControlTemplate>
										</Setter.Value>
									</Setter>
								</Style>
								<LinearGradientBrush x:Key="ButtonBorderGradient" EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="#FF4F4F4F"/>
									<GradientStop Color="#FF464646" Offset="1"/>
								</LinearGradientBrush>
							</Grid.Resources>
							<vsm:VisualStateManager.VisualStateGroups>
								<vsm:VisualStateGroup x:Name="CommonStates">
									<vsm:VisualStateGroup.Transitions>
										<vsm:VisualTransition GeneratedDuration="0:0:0.2" To="Pressed"/>
									</vsm:VisualStateGroup.Transitions>
									<vsm:VisualState x:Name="Normal" />
									<vsm:VisualState x:Name="Pressed" />
									<vsm:VisualState x:Name="Disabled">
										<Storyboard>
											<!--<DoubleAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>-->
										</Storyboard>
									</vsm:VisualState>
									
								</vsm:VisualStateGroup>
							</vsm:VisualStateManager.VisualStateGroups>

							<Border x:Name="Background" Visibility="Collapsed" BorderBrush="Transparent" BorderThickness="1" CornerRadius="5,5,5,5" Background="#FFA9A9A9" />
							<Border x:Name="BackgroundGradient" Visibility="Collapsed" BorderBrush="{StaticResource ButtonBorderGradient}" BorderThickness="1" CornerRadius="5,5,5,5" >
								<Border.Background>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FCFFFFFF"/>
										<GradientStop Color="#4CFFFFFF" Offset="1"/>
									</LinearGradientBrush>
								</Border.Background>
							</Border>
							

							<Popup x:Name="DropDownPopup" HorizontalOffset="0" VerticalOffset="0">
								<Grid Height="Auto" HorizontalAlignment="Left" VerticalAlignment="Top" Opacity="1">
									<Border x:Name="DropDownPopupBorder" Background="#F0F0F0" BorderBrush="#A0A0A0" BorderThickness="1,1,1,1" Margin="0,0,0,0" Height="Auto" Width="Auto">
										<ContentPresenter x:Name="DropDownPopupContent" Content="{TemplateBinding DropDownContent}" />
									</Border>
								</Grid>
							</Popup>
							
							<Button x:Name="ActionButton" Margin="2" Padding="5,0,2,0" Grid.Column="0" Style="{StaticResource BlankButton}" Content="{TemplateBinding Content}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" MinWidth="30" Width="Auto" />
							<Button x:Name="PopupButton" Grid.Column="1" Padding="0" Width="12" Style="{StaticResource BlankButton}" VerticalContentAlignment="Center">
								<Button.Content>
									<Path Margin="2,0,2,0" Stretch="Uniform" StrokeThickness="1" StrokeEndLineCap="Triangle" StrokeLineJoin="Round" Stroke="#FF5C5C5C" VerticalAlignment="Bottom" StrokeMiterLimit="1.000000" Fill="#FF5C5C5C" Data="F1 M 20.744629,15.662109 L 17.576172,10.995117 L 24.201172,10.995117 L 20.744629,15.662109 Z"/>
								</Button.Content>
							</Button>
							
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="PlainRoundButtonStyle" TargetType="Button">
			<Setter Property="IsEnabled" Value="true"/>
			<Setter Property="IsTabStop" Value="true"/>
			<Setter Property="Background" Value="#FFA9A9A9"/>
			<Setter Property="Foreground" Value="#FF000000"/>
			<Setter Property="MinWidth" Value="5"/>
			<Setter Property="MinHeight" Value="5"/>
			<Setter Property="Margin" Value="0"/>
			<Setter Property="Cursor" Value="Arrow"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid Height="Auto" Width="Auto">
							<Grid.Resources>
								<LinearGradientBrush x:Key="ButtonBorderGradient" EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="#FF4F4F4F"/>
									<GradientStop Color="#FF464646" Offset="1"/>
								</LinearGradientBrush>
								<SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF"/>
							</Grid.Resources>
							<vsm:VisualStateManager.VisualStateGroups>
								<vsm:VisualStateGroup x:Name="CommonStates">
									<vsm:VisualStateGroup.Transitions>
										<vsm:VisualTransition GeneratedDuration="0:0:0.2" To="Pressed"/>
									</vsm:VisualStateGroup.Transitions>
									<vsm:VisualState x:Name="Normal" />
									<vsm:VisualState x:Name="Pressed">
										<Storyboard>
											<DoubleAnimation Duration="0" Storyboard.TargetName="ButtonBackground" Storyboard.TargetProperty="Opacity" To="1"/>
										</Storyboard>
									</vsm:VisualState>
									<vsm:VisualState x:Name="Disabled">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="Visibility" Duration="0">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
								</vsm:VisualStateGroup>
							</vsm:VisualStateManager.VisualStateGroups>
							<Ellipse x:Name="ButtonBackground" Fill="#FF8E8E8E" Opacity=".50"/>
							<ContentPresenter x:Name="Content" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
							<Ellipse x:Name="DisabledOverlay" Fill="White" Opacity=".55" Visibility="Collapsed" IsHitTestVisible="False" />
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="CollapseButtonStyle" TargetType="ToggleButton">
			<Setter Property="IsChecked" Value="False"/>
			<Setter Property="Cursor" Value="Hand"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="ToggleButton">
						<Grid x:Name="Root">
							<vsm:VisualStateManager.VisualStateGroups>
								<vsm:VisualStateGroup x:Name="CommonStates">
									<vsm:VisualStateGroup.Transitions>
										<vsm:VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver"/>
										<vsm:VisualTransition GeneratedDuration="0:0:0" To="Pressed"/>
									</vsm:VisualStateGroup.Transitions>
									<vsm:VisualState x:Name="Normal" />
									<vsm:VisualState x:Name="MouseOver" />
								</vsm:VisualStateGroup>
								<vsm:VisualStateGroup x:Name="CheckStates">
									<vsm:VisualStateGroup.Transitions>
										<vsm:VisualTransition GeneratedDuration="0:0:0"/>
									</vsm:VisualStateGroup.Transitions>
									<!-- Checked = Expanded -->
									<vsm:VisualState x:Name="Checked">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonBackground" Storyboard.TargetProperty="Visibility" Duration="0">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<DoubleAnimation Storyboard.TargetName="IconRotateTransform" Storyboard.TargetProperty="Angle" To="180" Duration="00:00:0.2" />
										</Storyboard>
									</vsm:VisualState>
									<!-- Unchecked = Collapsed -->
									<vsm:VisualState x:Name="Unchecked">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonBackground" Storyboard.TargetProperty="Visibility" Duration="0">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<DoubleAnimation Storyboard.TargetName="IconRotateTransform" Storyboard.TargetProperty="Angle" To="0" Duration="00:00:0.2" />
										</Storyboard>
									</vsm:VisualState>
								</vsm:VisualStateGroup>
							</vsm:VisualStateManager.VisualStateGroups>
							<Grid>
								
								<Border x:Name="ButtonBackground" CornerRadius="6,6,0,0" BorderThickness="2,2,2,0" Margin="-1,0,0,0" Visibility="Collapsed" Background="#FFB9BABF">
									<Border.BorderBrush>
										<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
											<GradientStop Color="#FF4F4F4F"/>
											<GradientStop Color="#FF464646" Offset="1"/>
										</LinearGradientBrush>
									</Border.BorderBrush>
								</Border>
								<Border Background="Transparent">
									<Path x:Name="Icon" Grid.Row="0" Grid.RowSpan="2" Margin="3,4,4,1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Data="M1.5,1.904605 L22.173403,21.865133 M42.500004,1.5 L22.539474,22.173403 M1.5,31.904606 L22.173403,51.865131 M42.500004,31.5 L22.539474,52.173401" Fill="#FFFFFFFF" Stretch="Fill" Stroke="#FFFBFAFA" StrokeEndLineCap="Round"  StrokeLineJoin="Round" StrokeStartLineCap="Round" StrokeThickness="2.5" RenderTransformOrigin="0.5,0.5">
										<Path.RenderTransform>
											<TransformGroup>
												<ScaleTransform/>
												<SkewTransform/>
												<RotateTransform x:Name="IconRotateTransform" Angle="0"/>
												<TranslateTransform/>
											</TransformGroup>
										</Path.RenderTransform>
									</Path>
								</Border>
							</Grid>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		
	</UserControl.Resources>

	<Grid x:Name="LayoutRoot">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="*" />
			<ColumnDefinition Width="Auto" />
		</Grid.ColumnDefinitions>
		<Grid x:Name="SearchControl" Grid.Column="0" Margin="0,0,0,0">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="Auto" />
			</Grid.ColumnDefinitions>
			<berico:SplitButton x:Name="SearchButton" Command="{Binding ItemSelected}" Cursor="Hand" Height="35" Width="Auto" Margin="1,1,0,1" Style="{StaticResource SearchButtonStyle}" HorizontalContentAlignment="Left" VerticalContentAlignment="Center">
				<ToolTipService.ToolTip>
					<ToolTip Content="{Binding Description}" />
				</ToolTipService.ToolTip>
				<berico:SplitButton.Content>
					<Image x:Name="SB_Caption_Image" Source="{Binding CaptionImage}" Height="25" Width="25" />
				</berico:SplitButton.Content>
				<berico:SplitButton.DropDownContent>
					<ListBox x:Name="MenuListBox" Style="{StaticResource MenuListStyle}" SelectionMode="Single" SelectedItem="{Binding SelectedItem}" ItemsSource="{Binding MenuItems}">
						<i:Interaction.Triggers>
							<i:EventTrigger EventName="SelectionChanged">
								<cmd:EventToCommand Command="{Binding SelectionChangedCommand}"  PassEventArgsToCommand="True"/>
							</i:EventTrigger>
						</i:Interaction.Triggers>
					</ListBox>
				</berico:SplitButton.DropDownContent>
			</berico:SplitButton>
		</Grid>
	</Grid>

</UserControl>
